package com.ycl.plus.lm.hardware.domain.bo;

import com.ycl.plus.lm.common.core.validate.AddGroup;
import com.ycl.plus.lm.common.core.validate.EditGroup;
import com.ycl.plus.lm.common.mybatis.core.domain.BaseEntity;
import com.ycl.plus.lm.hardware.domain.HardwareEquip;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 设备业务对象 hardware_equip
 *
 * @author devil-ycl
 * @date 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HardwareEquip.class, reverseConvertGenerate = false)
public class HardwareEquipBo extends BaseEntity {

    @NotNull(message = "id不能为空")
    private Long id;
    /**
     * 设备名
     */
    @NotBlank(message = "设备名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 所属用户
     */
    private Long userId;

    /**
     * 设备别名
     */
    private String alias;

    /**
     * 激活状态
     */
    private Integer active;

    /**
     * 激活时间
     */
    private Date activeTime;

    /**
     * 制造商
     */
    @NotBlank(message = "制造商不能为空", groups = { AddGroup.class, EditGroup.class })
    private String manufacturer;

    /**
     * 型号
     */
    @NotBlank(message = "型号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String model;

    /**
     * 硬件版本
     */
//    @NotBlank(message = "硬件版本不能为空", groups = { EditGroup.class })
    private String firmwareVersion;

    /**
     * 软件版本
     */
//    @NotBlank(message = "软件版本不能为空", groups = { EditGroup.class })
    private String softwareVersion;

    /**
     * 位置
     */
    private String location;

    /**
     * 运行状态
     */
//    @NotNull(message = "运行状态不能为空", groups = { EditGroup.class })
    private Integer runStatus;

    /**
     * 运行时间
     */
    private Date startTime;

    /**
     * 停止时间
     */
    private Date endTime;

    /**
     * 上次运行
     */
    private Date lastStartTime;

    /**
     * 上次停止
     */
    private Date lastEndTime;

    /**
     * 传感器id
     */
    private List<Long> sensorIds;
}
